package flowlogic;

import java.util.ArrayList;

import ast.CstPr;
import ast.Function;

public class FunNode extends Node {
	
	private Function function;
	private ArrayList<FreeVariable> argList; // (v_1,...,v_n)
	
	public FunNode(Function func, ArrayList<FreeVariable> al)
	{
		function = func;
		argList = al;
	}
	
	public CstPr apply()
	{
		CstPr res = null;
		
		return res;
	}
	
	public Function getFunction() {
		return function;
	}

	public ArrayList<FreeVariable> getArgList() {
		return argList;
	}

	public String toString()
	{
		String res = "";
		res += function.getName();
		res += "(";
		for (int i = 0; i < argList.size(); i++) {
			res += argList.get(i).getName();
			if (i != argList.size() - 1) 
				res += ",";
		}
		res += ")";
		return res;
	}

}
